home *** CD-ROM | disk | FTP | other *** search
- Path: news.sinet.slb.com!usenet
- From: "Vinh D. Nguyen" <vnguyen@sugar-land.anadrill.slb.com>
- Newsgroups: comp.lang.c++
- Subject: Re: BC++ Inheritance Question...
- Date: Mon, 11 Mar 1996 18:18:03 -0600
- Organization: Schlumberger Anadrill
- Message-ID: <3144C2BB.3532@sugar-land.anadrill.slb.com>
- References: <311D9DBE.9E5@iglou.com> <DMoyDs.3wL@news.arco.com> <3120CFB8.3CB@iglou.com> <4fr595$fra@qualcomm.com>
- NNTP-Posting-Host: 163.185.118.40
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (WinNT; I)
-
- Nasser Abbasi wrote:
- >
- > In article <3120CFB8.3CB@iglou.com>, panther@iglou.com says...
- >
- > >So let me get this straight...
- > >
- > > In public inheitance, public members stay public, protected
- > members stay
- > >protected, and private members stay private in the in the derived class.
- >
- > close but no sigar.
- >
- > in private inheritance, public and protected members of base class
- > become private in derived class, but private members of base class
- > stay private members to the base class.
- >
- > Nasser
-
- I would also like to add that the inheritance protection mechanism is
- reversible. That is, if a public member in a parent class, or for that
- matter any ancestor classes, becomes protected or private through protected
- or private inheritance somewhere along the inheritance chain, the member can
- be made public again by declaring it as so in the derived class using the
- Parent_Class::Member syntax.
-
- --
- --------------------------------------------------------------------------
- * Vinh Nguyen vnguyen@slb.com *
- * Drilling Information Products - Senior Engineer *
- * Anadrill Schlumberger *
- * 200 Gillingham Ln. (713) 275-7524 (Office) *
- * Sugarland, TX 77478 (713) 275-8098 (FAX) *
- --------------------------------------------------------------------------
-